package com.netease.spring.ch3;

import com.netease.spring.ch2.Instrument;
import com.netease.spring.ch2.Performer;
import com.netease.spring.exceptions.PerformanceException;

public abstract class Instrumentalist implements Performer {
    private String song;

    /**
     * @param song
     *            the song to set
     */
    public void setSong(String song) {
        this.song = song;
    }

    public abstract Instrument getInstrument();

    @Override
    public void perform() throws PerformanceException {
        System.out.println("Playing " + song + " : ");
        getInstrument().play();
    }

}
